package ai.zixing.example01;

import java.util.ArrayList;

/**
 * 叶子节点
 *      叶子节点中不能包含子节点
 */
public class Leaf extends Component {

    private ArrayList<Component> list;

    @Override

    public void add(Component c) {
    }

    @Override
    public void remove(Component c) {
    }

    @Override
    public Component getChild(int i) {
        return new Leaf();
    }

    @Override
    public void operation() {

    }
}
